<?php /*
	Template Name: Archives (Do Not Use Manually)
*/ ?>

<?php
	$numposts = $wpdb->get_var("SELECT COUNT(1) FROM $wpdb->posts WHERE post_status = 'publish' AND post_type != 'page'");
	if (0 < $numposts) $numposts = number_format($numposts); 
	
	$numcomms = $wpdb->get_var("SELECT COUNT(1) FROM $wpdb->comments WHERE comment_approved = '1'");
	if (0 < $numcomms) $numcomms = number_format($numcomms);
	
	$numcats = $wpdb->get_var("SELECT COUNT(1) FROM $wpdb->categories");
	if (0 < $numcats) $numcats = number_format($numcats);
?>

<?php get_header(); ?>
<div id="main">
<div class="primary content">
	<div id="dynamic-content"></div>
	<div id="current-content" class="hfeed">
		<?php the_post(); ?>
		<div id="entry-<?php the_ID() ?>" class="<?php braille_post_class() ?>">
			<h2 class="entry-title"><a href="<?php the_permalink() ?>" rel="bookmark" title='<?php printf(__('Permalink to "%s"', 'braille'), wp_specialchars(get_the_title(),1)); ?>'><?php the_title(); ?></a></h2>
			<div class="entry-content">
				<p><?php printf(__('This is the %1$s archives. Currently the archives holds %2$s posts and %3$s comments, all contained within %4$s categories. If you are looking for something specific, perhaps you should try the search on the sidebar.','braille'), get_bloginfo('name'), $numposts, $numcomms, $numcats); ?></p>
				<?php braille_archive::archive(); ?>
			</div>
		</div>
	</div>
</div>
<?php get_sidebar(); ?>
<div class="clear"></div>
</div>
</div>
<?php get_footer(); ?>